#include<iostream>

using namespace std;

template<typename T, size_t N>
void func(T(&arr)[N])
{
	for (size_t i = 0; i < N; ++i)
		arr[i] = i;
}

int main()
{
	int a[5]{};
	for (auto i : a)
		cout << i << endl;
	func(a);
	for (auto i : a)
		cout << i << endl;

	return 0;
}